<!DOCTYPE html>
<html>
<body>

<h1>JavaScript 对象属性</h1>

<p id="demo"></p>

<script>
var txt = "";
var person = {fname:"Bill", lname:"Gates", age:62}; 
var x;
for (x in person) {
  txt += person[x] + " ";
}
document.getElementById("demo").innerHTML = txt;
</script>

</body>
</html>